#!/usr/bin/env python3
# -*- coding: utf-8 -*-

l = (range(101))
sum = 0
for i in l:
    sum += i
print(sum)


def my_abs(abs):
    if not isinstance(abs, (int, float)):
        return TypeError("错误参数")
    if abs > 0:
        return abs
    else:
        return -abs


x = my_abs(11)
print(x)
x = my_abs(-111)
print(x)
x = my_abs("ada")
print(x)

# Slice
L = [0, 1, 2, 154, 54]
print(L[0:2])
L = range(101)
print(L)
